# 验证: IntEnum 可以与 数值直接判断
from enum import IntEnum
class Shape(IntEnum):
    Circle = 1
    Square = 2

# 遍历
for shape in Shape:
    print(shape.name, shape.value)
    
# 索引
# print(Shape[1].name, Shape[1].value) # --NG, Enum 不支持索引